//
//  WSImageCell.h
//  CharonTVProject
//
//  Created by karong on 2023/6/13.
//

#import "WSImageCell.h"

@implementation WSImageCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.layer.masksToBounds = NO;
        self.contentView.layer.masksToBounds = NO;
        [self setUI];
    }
    return self;
}

- (void)setUI {
    _bannerImageView = [[UIImageView alloc] init];
    _bannerImageView.layer.cornerRadius = 8.0f;
    _bannerImageView.layer.masksToBounds = YES;
    _bannerImageView.contentMode = UIViewContentModeScaleAspectFill;
    _bannerImageView.backgroundColor = [UIColor colorFromHexRGB:@"ececec"];
    
    _bannerView = [[UIView alloc]init];
    _bannerView.clipsToBounds = NO;
    [_bannerView addSubview:_bannerImageView];
    [_bannerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.bottom.mas_equalTo(_bannerView);
    }];
    [self.contentView addSubview:_bannerView];
}
@end
